<?php
	$this->_helper->layout()->disableLayout();

	$table1 = new Application_Model_DbTable_Itemtab();
	$selectX = $table1->select()->order('tt_id ASC')->limit(20);
	$selectY = $table1->select()->setIntegrityCheck(false)
	                  ->from(array('Y' => new Zend_Db_Expr('(' . $selectX . ')')))
	                  ->where('tt_id < 15')
	                  ->order('RAND()');
	$selectZ = $table1->select()->setIntegrityCheck(false)
	                  ->from(array('Z' => new Zend_Db_Expr('(' . $selectY . ')')))
	                  ->limit(3);
	$rowset = $table1->fetchAll($selectZ);
	var_dump($rowset->toArray());